package com.pragmatic;

import lombok.extern.slf4j.Slf4j;
import org.bouncycastle.jce.provider.BouncyCastleProvider;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import java.security.Security;

/**
 * ...
 *
 * @author wangdong
 * @since 2022/9/28 11:29
 */
@Slf4j
@SpringBootApplication
public class CallerSm4RsaApplication {

  public static void main(String[] args) {
    //
    SpringApplication.run(CallerSm4RsaApplication.class, args);
    // 因为标准的Java加密体系（JCE）默认不支持国密算法（如SM4）,将BouncyCastle作为新的安全提供者（Provider）添加到JVM的全局安全列表中，使Java能识别SM4等算
    Security.addProvider(new BouncyCastleProvider());
    log.info("Caller-sm4-rsa服务启动成功......");
  }
}
